<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
	<!-- link-admin.html -->
	<tal:block tal:content="structure this/silkHead"/>
    </head>

    <body>
	<div class="silk-cms-container">
	    <tal:block tal:content="structure php:this.renderPartial('common/header')" tal:on-error="string:Template Failed to Render (common/header)"/>

	    <div class="silk-cms-subheader ui-widget ui-widget-content">
		<h3><tal:block i18n:translate="string:Managed Links"/></h3>
	    </div>

	    <div class="silk-cms-manage-links floatwrapper">
		<ul class="rfloat">
		    <li tal:condition="permission:Type ${type/type_id} Create"><a class="silk-cms-button ui-state-default ui-corner-all" tal:attributes="href php:this.link('object_create') . '?type=link'"><span class="ui-icon ui-icon-plusthick"/><span class="button-text" i18n:translate="string:Add Link"/></a></li>
		</ul>
	    </div>
	    <hr/>
	    <div id="silk-core-links" class="silk-cms-list-container">

		<p tal:condition="empty:links" i18n:translate="string:No links defined"></p>

		<table class="silk-cms-list">

		    <tr tal:repeat="link links">
			<td>
			    <a tal:attributes="href php:this.link('object_edit', array('object_id' => link.object_id))" tal:content="php:link.name"/>
			</td>
			<td>
			    <div class="silk-cms-manage-links">
			    <ul>
				<li><a tal:attributes="href php:this.link('object_edit', array('object_id' => link.object_id))" i18n:translate="string:Edit"></a></li>
				<li><a tal:attributes="href php:this.link('object_delete', array('object_id' => link.object_id))" i18n:translate="string:Delete"></a></li>
				<li><a tal:attributes="href php:this.link('object_permissions') . '?object_id=' . link.object_id" i18n:translate="string:Permissions"></a></li>
			    </ul>
			    </div>
			</td>
		    </tr>

		</table>
	    </div>

	    <tal:block tal:content="structure php:this.renderPartial('common/footer')" tal:on-error="string:Template Failed to Render (common/footer)"/>
	</div>
    </body>
</html>

